<%= form_for(@item_menu) do |f| %>
<% if @item_menu.errors.any? %>
<div class="row-fluid">
	<div id="error_explanation" class="span12">
		<h2><%= pluralize(@item_menu.errors.count, "error") %> prohibited this item_menu from being saved:</h2>

		<ul>
			<% @item_menu.errors.full_messages.each do |msg| %>
			<li>
				<%= msg %>
			</li>
			<% end %>
		</ul>
	</div>
</div>
<% end %>

<div class="row-fluid">
	<div class="span2">
		<%= f.label :nome %>
	</div>
	<div class="span10">
		<%= f.text_field :nome %>
	</div>
</div>
<div class="row-fluid">
	<div class="span2">
		<%= f.label :menu_id %>
	</div>
	<div class="span10">
		<%= f.collection_select :menu_id, @menus, :id, :nome, {:prompt => "Selecione" }   %>
	</div>
</div>
<div class="row-fluid">
	<div class="span2">
		<%= f.label :acao_id, "Tipo Item a Exibir" %>
	</div>
	<div class="span10">
		<%= f.collection_select :acao_id,@acao_item_menus, :id, :nome, {prompt: false}  %>
	</div>
</div>
<div class="row-fluid">
	<div class="span2">
		<%= f.label :acao_item_id, "Item a Exibir" %>
	</div>
	<div class="span10">
		<%= f.number_field :acao_item_id %>
	</div>
</div>
<div class="row-fluid">
	<div class="span2">
		<%= f.label :pai %>
	</div>
	<div class="span10">
		<%= f.collection_select :pai, @item_menus, :id, :nome, {:prompt => "Nenhum"} %>
	</div>
</div>
<div class="row-fluid">
	<div class="span2">
		<%= f.check_box :ativo, 
		{:checked => @item_menu.id.nil? ? "checked" : @item_menu.ativo  } %>
	</div>
	<div class="span10">
		<%= f.label :ativo %>
	</div>
</div>
<div class="row-fluid">
	<div class="span12">
		<%= f.submit "Gravar", :class => "btn" %>

		<% end %>
